<%--
  Created by IntelliJ IDEA.
  User: aiwzy
  Date: 2022/4/18
  Time: 16:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>个人界面</title>
    <link rel="stylesheet" href="../css/me.css" type="text/css">
    <link rel="stylesheet" href="../css/head.css" type="text/css">
</head>
<body>
<div class="head">
    <ul class="u1">
        <li><a href="../index.jsp" >美食天下 首页</a></li>
        <li><a href="http://localhost:8080/system/dish.jsp">菜谱</a></li>
        <li><a href="http://localhost:8080/system/cook.jsp">食材</a></li>
        <li><a href="#">专题</a></li>
        <li><a href="#">笔记</a></li>
        <li><a href="#">社区</a></li>
        <li><a href="#">活动</a></li>
        <li><a href="#">搜索</a></li>
    </ul>
    <a class="nr" href="#"><img src="../image/nr3.png" style="width: 18px;height: 18px;margin-top: 5px;"/><br/>客户端</a>
    <ul class="u2" style="position: fixed;
    right: 68px;
    top: -13px;
    margin-right: 4px;">
        <li class="pic">
            <img src="
<%--        <c:if test="${!sessionScope.user.avatar.equals('')}">--%>
        <c:if test="${!sessionScope.user.avatar.equals('')}">
        ${sessionScope.user.avatar}
        </c:if>
        <c:if test="${!sessionScope.user.avatar.equals('')}">
        https://tse2-mm.cn.bing.net/th/id/OIP-C.Z8cO0OriANaUVakbQ6n0BwAAAA?w=153&h=165&c=7&r=0&o=5&dpr=1.65&pid=1.7
        </c:if>
" onclick="jump()" style="width: 35px;height: 35px; border-radius: 45%;cursor: pointer" >
            <script src="../js/jquery-3.2.1.min.js"></script>
            <script type="text/javascript">
                function jump(){
                    var src = $("img")[0].src;
                    $.ajax({
                        url:http_request+"/system/member.jsp",
                        data:{
                            img:src
                        },
                        dataType:"text",
                        success:function (){
                            alert("欢迎来到个人中心！")
                            window.location.href=http_request+"/system/member.jsp"
                        },
                        error:function (){
                            alert("个人中心跳转失败！")
                        }
                    })
                }
            </script>

        </li>
        <li class="l2">
            <c:if test="${empty sessionScope.user.username}">
                <div class="d1" >
                    <a href="/checkLogin" >登录/注册</a>
                </div>
            </c:if>
            <c:if test="${not empty sessionScope.user.username}">
                <div class="d1" >
                    <a href="http://localhost:8080/system/member.jsp"  style="font-size: 15px; text-align: center; vertical-align: middle">${sessionScope.user.username}</a>
                </div>
            </c:if>
        </li>
        <li class="l1"><div><a href="http://localhost:8080/system/makeCook.jsp"><img src="../image/nr1.png" style="width: 18px;height: 18px;margin-top: 5px;margin-right: 2px;"/><br/>发布</a></div></li>
        <li class="l1">
            <div>

                <img id="a1" src="../image/nr2.png" style="width: 18px;height: 18px;margin-top: 5px;margin-right: 2px"/><br/>
                <span id="s1">签到有礼</span>
                <script type="text/javascript">
                    $(function (){
                        <c:if test="${not empty sessionScope.user.username}">
                        $("#a1").click(function (){
                            $("#s1").html("已签到");
                        })
                        </c:if>
                        <c:if test="${ empty sessionScope.user.username}">
                        $("#a1").click(function (){
                            alert("请您先进行登录。。。")
                        })
                        </c:if>


                    })
                </script>


            </div>
        </li>
    </ul>
</div>
<div>

    <div class="mod_left">
        <div class="menu_wrap">
            <dl>
                <dt >
                    <a class=on href="http://localhost:8080/system/member.jsp">会员<br>中心</a>
                </dt>
                <dt >
                    <a href="/myDishServlet?username=${sessionScope.user.username}" style="cursor: pointer">菜谱</a>
                </dt>


                <dt >
                    <a  href="">话题</a>
                </dt >
                <dt >
                    <a   href="#">日志</a>
                </dt>
                <dt >
                    <a  href="../index.jsp">菜单</a>
                </dt>
                <dt >
                    <a  href="#">收藏</a>
                </dt>
                <dt >
                    <a  href="#">账户<br>设置</a>
                </dt>
            </dl>
        </div>

    </div>

    <!-- 右侧 -->
    <div class="mod_right">


        <div class="space_info clear">

            <div class="pic">
                <a href="https://home.meishichina.com/space-12927127.html" target="_blank"><img
                        class="imgLoad" src="${sessionScope.user.avatar}"
                        data-src="${sessionScope.user.avatar}" width="150" height="150"></a>
            </div>
    <div class="img-upload">
        <div  title="上传头像" class="upload-icon">
            <v-icon scale="2.0" style="color:#ffffff" name="cloud-upload-alt"></v-icon>
        </div>
        <img src="${sessionScope.user.avatar}" width="150" height="150" alt class="avatar">
    </div>

            <div class="w logo_wrap2">
                <div class="logo_search right1">
                    <div class="searchBox J_search"><a href="javascript:;" title="搜索"
                                                       class="search_Btn J_searchBTN right" id="search">搜索</a>
                        <input
                            type="text" id="q" class="search_Text J_searchTxt right">
                    </div>
                </div>
            </div>


            <div class="detail">

                <em><a href="https://home.meishichina.com/space-12927127.html" target="_blank">${sessionScope.user.username}</a></em>


                <ul class="substatus">

                    <li>
                        <a title="成长值" href="https://home.meishichina.com/event/" target="_blank">
                            <b>0</b><br>
                            成长值
                        </a></li>
                    <li>
                        <a title="幸运草" href="https://home.meishichina.com/event/" target="_blank">
                            <b>5</b><br>
                            幸运草
                        </a></li>
                    <li>
                        <a title="美粒" href="https://home.meishichina.com/event/" target="_blank">
                            <b>0</b><br>
                            美粒
                        </a>
                    </li>


                    <li>
                        <a title="关注" href="https://member.meishichina.com/center/my_relation_follow/">
                            <b>20</b><br>
                            关注
                        </a></li>
                    <li>
                        <a title="粉丝" href="https://member.meishichina.com/center/my_relation_fans/">
                            <b>0</b><br>
                            粉丝
                        </a></li>
                    <li>
                        <a title="赞与收藏" href="###">
                            <b>0</b><br>
                            赞与收藏
                        </a></li>
                </ul>


                <div class="subtools">
                    <a href="https://member.meishichina.com/center/my_notice_list/">通知
                    </a>
                    <a href="https://member.meishichina.com/center/privately_list/">私信
                    </a>
                    <a class="welfare" href="https://home.meishichina.com/event/" target="_blank">
                        福利活动
                    </a>
                </div>

            </div>
        </div>
    </div><!-- 右侧结束 -->
</div>
</body>
</html>
